package mydemo.springcloudalibaba.provider.controller;

import lombok.extern.slf4j.Slf4j;
import mydemo.springcloudalibaba.api.common.entity.CommonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/payment")
@Slf4j
public class PaymentController {
    @Value("${server.port}")
    private String serverPost;
    @Autowired
    private DiscoveryClient discoveryClient;

    @RequestMapping("/get/{id}")
    public CommonResult getPaymentById_success(@PathVariable("id") Long id) {
        return new CommonResult(200, "成功" + serverPost);
    }
}
